import 'dart:convert';
import 'package:fluro/fluro.dart';
import 'package:flutter/cupertino.dart';
import 'package:pwd_keeper/common/string_util.dart';
import 'package:pwd_keeper/pages/pwd/create_keeper.dart';
import 'package:pwd_keeper/pages/pwd/detail.dart';

Handler createKeeperPageHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    return CreateKeeperPage();
  },
);

Handler keeperDetailPageHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    String pwdKeeper = params['keeper'].first;
    return PwdKeeperDetailPage(pwdKeeper: json.decode(pwdKeeper));
  },
);
